package com.util;

import android.content.Context;
import android.view.Gravity;
import android.view.View;
import android.widget.LinearLayout;
import android.widget.LinearLayout.LayoutParams;
import android.widget.TextView;
import android.widget.Toast;

import com.videoplayer.R;

public class MyToast extends Toast{

	private Context context;
	private String content;
	public MyToast(Context context,String content) {
		super(context);
		this.context = context;
		this.content = content;
		View contentView = View.inflate(context, R.layout.toast_layout, null);
        TextView message = (TextView) contentView.findViewById(R.id.message);  
        message.setText(content);
        this.setGravity(Gravity.CENTER, 0, 240);  
        this.setDuration(800);  
        this.setView(contentView);  
	}
	
	public MyToast(Context context,String content,int duration) {
		super(context);
		this.context = context;
		this.content = content;
		View contentView = View.inflate(context, R.layout.toast_layout, null);
        TextView message = (TextView) contentView.findViewById(R.id.message);  
        message.setText(content);
        this.setGravity(Gravity.CENTER, 0, 240);  
        this.setDuration(duration);  
        this.setView(contentView);  
	}
	

	@Override
	public void setView(View view) {
		super.setView(view);
	}
	

}
